home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / pipeline / abacus / p_line / Vlookup01 / ReadMe next >
Text File  |  1993-10-16  |  2KB  |  49 lines

  1. %OP%VS4.13 (28-Apr-92), Gerald L Fitton, R4000 5966 9904 9938 
  2. %OP%DP0
  3. %OP%IRY
  4. %OP%PL0
  5. %OP%HM0
  6. %OP%FM0
  7. %OP%BM0
  8. %OP%LM4
  9. %OP%PT1
  10. %OP%PDPipeLine
  11. %OP%WC1026,2262,188,1748,0,0,0,0
  12. %CO:A,72,72%
  13. %C%The vlookup(,,) Function
  14. %C%by Gerald L Fitton
  15. Keywords:
  16. Vlookup Fitton
  17.  
  18. First, let us see how it works.  Load the file [TestFile], click on the
  19. cell B5 and you will see that it contains the number 50.  This is 
  20. between the 40 Pass mark (in cell B10) and the 60 needed for a Merit.  
  21. The formula in C5 is vlookup(B5,B8B13,1) which, in this case, returns 
  22. the string Pass from slot C10.
  23.  
  24. Try a few other numbers (preferably between 0 and 100) and you will 
  25. find that, if you don't have an exact match, then the next lower mark 
  26. determines the grade awarded.  For vlookup(key,range1,offset) to work 
  27. correctly it is essential that range1 (in this case B8B13) is sorted in 
  28. ascending order - ignore this at your peril!
  29.  
  30. The offset is the third argument of the function.  You decide on the 
  31. offset you need by counting the column containing range1 as a zero 
  32. offset and counting to the right.  The formula in cell C5 refers to an 
  33. offset of 1 and that in D5 an offset of 2.
  34.  
  35. Experiment by changing the offset in either C5 or D5 to any number 
  36. between 0 and 2 inclusive.  I suggest that you spend a little time 
  37. thinking of applications for an offset of 0 - I think it could be 
  38. useful for tricky rounding down problems!
  39.  
  40. The range, range1, is a single column; you can not include an array.
  41.  
  42. Finally, all the lookup functions have a different syntax in Resultz so 
  43. that, if you 'port' an application (such as this) containing 
  44. vlookup(,,) to Resultz then you will get an error message!  The 
  45. function corresponding to vlookup(B5,B8B13,2) in Resultz is 
  46. vlookup(B5,B8D13,3) - both the range and offset have changed!
  47.  
  48. Any volunteers for a similar article about lookup(,,)?
  49.